package com.project.frame.common.utils.convert;

import cn.hutool.core.date.DateUtil;
import lombok.extern.slf4j.Slf4j;

import java.beans.PropertyEditorSupport;

/**
 * desc
 *
 * @author lw007
 * @date 2021/12/23
 */
@Slf4j
public class TimestampConvertEditor extends PropertyEditorSupport {
    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        log.info("text.{}",text);
        setValue(DateUtil.parse(text).toTimestamp());
    }
}
